#pragma once

#include "USB3Device.h"

#include <iostream>
using namespace std;

/*
template <typename T>
class DataQueue : public boost::noncopyable
{
public:
	typedef boost::circular_buffer<T> QueueType;
	typedef typename QueueType::size_type size_type;
	typedef typename QueueType::value_type value_type;

	explicit DataQueue(size_type size) : m_Queue(size)
	{
	}

	void Put(const value_type& data)
	{
		{
			std::lock_guard<std::mutex> lock(m_mutex);
			m_Queue.push_back(data);
		}

		m_cndNotEmpty.notify_one();
	}

	void Put(value_type&& data)
	{
		{
			std::lock_guard<std::mutex> lock(m_mutex);
			m_Queue.push_back(data);
		}

		m_cndNotEmpty.notify_one();
	}

	void Get(value_type& data)
	{
		std::unique_lock<std::mutex> lock(m_mutex);
		while (m_Queue.empty())
		{
			m_cndNotEmpty.wait(lock);
		}
		data = m_Queue.front();
	}

	bool GetNonBlock(value_type& data)
	{
		std::unique_lock<std::mutex> lock(m_mutex);
		if (m_Queue.empty())
			return false;

		data = m_Queue.front();
		m_Queue.pop_front();

		return true;
	}

	size_t size()
	{
		std::unique_lock<std::mutex> lock(m_mutex);
		return m_Queue.size();
	}

	size_t max_size()
	{
		return m_Queue.capacity();
	}

private:
	QueueType m_Queue;
	std::mutex m_mutex;
	std::condition_variable m_cndNotEmpty;
};
*/


template<typename USB3DeviceType, typename = std::enable_if_t<std::is_base_of<USB3Device, USB3DeviceType>::value>>
class USB3Stream
{
public:
	using device_type = typename USB3DeviceType;

	virtual ~USB3Stream() = default;

	virtual void startStreaming(bool multiBuffer = true) = 0;

	virtual void stopStreaming() = 0;

};

